import Mock from 'mockjs'

const { Random } = Mock

export default [
  {
    url: '/api/user/info',
    method: 'get',
    response: () => ({
      errno: 0,
      data: {
        username: Random.title(),
        nickname: Random.cname(),
      },
    }),
  },
  {
    url: '/api/user/register',
    method: 'post',
    response: () => ({
      errno: 0,
    }),
  },
  {
    url: '/api/user/login',
    method: 'post',
    response: () => ({
      errno: 0,
      data: {
        token: Random.word(20),
      },
    }),
  },
]
